home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
System Booster
/
System Booster.iso
/
Archives
/
ForCLI
/
PushD37_1.readme
< prev
next >
Wrap
Text File
|
1996-09-26
|
4KB
|
101 lines
Short: V37 dir stack cmds like in Unix tcsh
Type: util/cli
Uploader: torsten@diku.dk (Torsten Poulin Nielsen)
Author: torsten@diku.dk (Torsten Poulin Nielsen)
PushD(V37) PushD(V37)
FORMAT
PushD [[DIR] name | TOP number]
PopD [[DISCARD] number]
Dirs [NUM]
TEMPLATES
DIR,TOP/K/N
DISCARD/N
NUM/S
PURPOSE
To maintain and manipulate a stack of directories.
SPECIFICATION
PushD with no arguments, swaps the top two elements of the
directory stack. Given a name argument, PushD changes to
the new directory and pushes the old current working
directory onto the directory stack. If the TOP argument
is given, PushD extracts the numberth argument of the
directory stack and makes it the current directory. The
members of the directory stack are numbered from the top,
starting with 0 which is the current directory. PushD top
1 has the same effect as PushD without arguments. DIR and
TOP are mutually exclusive.
PopD pops the directory stack, returning to the new top
directory. With a numerical argument, it discards the
numberth entry in the stack. This is useful for removing
directories from the stack that don't exist anymore. Giv
ing the argument 0 has the same effect as PopD without an
argument, i.e., stack element 1 becomes the new current
directory.
Dirs prints the directory stack; the top of the stack is
at the left; the first directory in the stack is the cur
rent directory. If the NUM switch is used, each directory
is printed on a line by itself, preceded by its number in
the stack. The current directory is given the number 0.
The contents of the directory stack is kept in the shell
variable DStack. An easy way of discarding the entire
stack is therefore to say
1> Unset DStack
It shouldn't be too difficult to come up with a way in
which to save the contents of the stack between sessions.
INSTALLATION
There is only one executable, PushD. The other two are
just links:
1> MakeLink PopD PushD
1> MakeLink Dirs PushD
CAVEAT
If used under WShell, the prompt string isn't updated as
it should after a directory change. This is an anomaly in
WShell. As a kludge, you can put %[cd >nil:] in your
prompt string. This forces WShell to update its idea of
the current directory after each command.
AUTHOR
Torsten Poulin (torsten@diku.dk)
UNRESTRICTIONS
PushD is free; anyone may redistribute copies of PushD to
anyone under the terms stated in the GNU General Public
Licence, a copy of which accompanies each copy of PushD.
Torsten Poulin encourages you to improve and extend PushD
and urges that you contribute your extensions to the
world.
SEE ALSO
CD(AmigaDOS)
============================= Archive contents =============================
Original Packed Ratio Date Time Name
-------- ------- ----- --------- -------- -------------
17982 6993 61.1% 04-Jan-93 17:56:56 PushD/COPYING
2444 1678 31.3% 13-Jun-94 23:17:50 PushD/PushD
3660 1435 60.7% 16-Jun-94 11:06:52 PushD/PushD.man
207 117 43.4% 13-Jun-94 23:14:48 PushD/src/include/PushD-PopD-Dirs_rev.h
2 2 0.0% 13-Jun-94 23:14:48 PushD/src/include/PushD-PopD-Dirs_rev.rev
11224 3774 66.3% 16-Jun-94 11:08:16 PushD/src/PushD.c
2668 1234 53.7% 16-Jun-94 11:05:48 PushD/src/PushD.V37
298 203 31.8% 16-Jun-94 11:23:46 PushD/src/smakefile
-------- ------- ----- --------- --------
38485 15436 59.8% 18-Jun-94 15:55:08 8 files